/-app
/-core
/-headers
/-imports
/-io
BufferReader.ts
/-managed ...
/-managed/metadata ...
/-managed/metadata/enums
AssemblyFlags.ts
AssemblyHashAlgorithm.ts
CallingConventions.ts
ClrImageFlags.ts
ClrMetadataSignature.ts
ElementType.ts
EventAttributes.ts
FieldAttributes.ts
FileAttributes.ts
GenericParamAttributes.ts
ManifestResourceAttributes.ts
MethodAttributes.ts
MethodImplAttributes.ts
MethodSemanticsAttributes.ts
PInvokeAttributes.ts
ParamAttributes.ts
PropertyAttributes.ts
SecurityAction.ts
TableKind.ts
TypeAttributes.ts
convert.js
ClrDirectory.ts
ClrMetadata.ts
CodedIndexReader.ts
CodedIndexReaders.ts
MetadataStreams.ts
SignatureReader.ts
TableCompletionReader.ts
TableReader.ts
TableStream.ts
bits.ts
/-managed/tables
Assembly.ts
AssemblyOS.ts
AssemblyProcessor.ts
AssemblyRef.ts
AssemblyRefOS.ts
AssemblyRefProcessor.ts
ClassLayout.ts
Constant.ts
CustomAttribute.ts
DeclSecurity.ts
Event.ts
EventMap.ts
ExportedType.ts
Field.ts
FieldLayout.ts
FieldMarshal.ts
FieldRva.ts
File.ts
GenericParam.ts
GenericParamConstraint.ts
ImplMap.ts
InterfaceImpl.ts
ManfiestResource.ts
MemberRef.ts
MethodDef.ts
MethodImpl.ts
MethodSemantics.ts
MethodSpec.ts
Module.ts
ModuleRef.ts
NestedClass.ts
Param.ts
Property.ts
PropertyMap.ts
StandaloneSig.ts
TypeDef.ts
TypeRef.ts
TypeSpec.ts
AppDomain.ts
Assembly.ts
EventInfo.ts
FieldInfo.ts
MethodInfo.ts
ParameterInfo.ts
PropertyInfo.ts
Type.ts
/-typings
/-unmanaged
pe.html
pe.ts
125
 
126
      var type = this.readType(reader);
127
 
128
      var params = [];
129
      for (var i = 0; i < paramCount; i++) {
130
        var p = this.readParam(reader);
131
        params.push(p);
132
      }
133
 
134
      def.propertyType = type;
135
      // TODO: def. parameters...
136
    }
137
 
138
    /** ECMA-335 II.23.2.5 */
139
    readLocalVarSig(reader: io.BufferReader) {
140
 
141
      var callingConvention = <SignatureReader.CallingConvention>reader.readByte();
142
      if (callingConvention !== SignatureReader.CallingConvention.Local)
143
        throw new Error('Expected CallingConvention.Local, encountered ' + formatEnum(callingConvention, SignatureReader.CallingConvention) + '.');
144
 
145
      var count = this._readCompressed(reader);
146
 
147
      var locals = [];
148
      for (var i = 0; i < count; i++) {
149
 
150
        var peekNext = reader.peekByte();
151
        if (peekNext === ElementType.TypedByRef) {
152
          reader.readByte();
153
          var typedByRef = null; // fetch well-known type for TypedReference
154
          locals.push();
155
        }
156
 
157
        var customMods = [];
158
        var constraints = [];
159
 
160
        while (true) {
161
 
162
          var customMod = this.readCustomMod(reader);
163
          if (customMod)
164
            customMods.push(customMod);
165
          
166
          var constraint = this.readConstraint(reader);
167
          if (constraint)
168
            constraints.push(constraint);
169
        }
170
 
171
        var isByRef = false;
172
        peekNext = reader.peekByte();
173
        if (peekNext === ElementType.ByRef) {
174
          isByRef = true;
175
          reader.readByte();
176
        }
177
 
178
        var type = this.readType(reader);
179
      }
180
    }
181
 
182
    readRefType(reader: io.BufferReader): Type {
183
      return null;
184
    }
185
 
186
    readConstraint(reader: io.BufferReader) { 
187
    }
188
      
189
    readParam(reader: io.BufferReader) {
190
    }
191
 
192
    readCustomMod(reader: io.BufferReader) {
193
    }
194
 
195
    readType(reader: io.BufferReader): Type {
196
      return null;
197
    }
198
 
199
    private _readCompressed(reader: io.BufferReader): number { 
200
      var b0 = reader.readByte();
201
      if (!(b0 & 0x80)) return b0;
202
 
203
      var b1 = reader.readByte();
204
      if (!(b0 & 0x40))